package com.huawei.gamebox.service.welfare.gift.card;

import android.content.Context;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ImageView;
import android.widget.TextView;
import com.huawei.appgallery.foundation.ui.framework.cardkit.bean.CardBean;
import com.huawei.appgallery.foundation.ui.framework.widget.MaskImageView;
import com.huawei.gamebox.service.common.cardkit.card.BaseGsCard;
import com.huawei.gamebox.service.welfare.gift.bean.GiftCardBean;
import o.cgz;
import o.chy;
import o.Logger;
import o.eqx;
import o.exp$f;
import o.exp.d;
import o.fcs;

public class HorizonGiftCard extends BaseGiftCard {
    private TextView ˏ = null;

    public /* synthetic */ cgz ˏ(View view) {
        return ˊ(view);
    }

    public HorizonGiftCard(Context context) {
        super(context);
    }

    public BaseGsCard ˊ(View view) {
        ˏ((ImageView) view.findViewById(d.ॱˋ));
        this.ˏ = (TextView) view.findViewById(d.ˊ);
        ˊ((TextView) view.findViewById(d.ˏ));
        ʽ(view);
        ((MaskImageView) this.ʽॱ).setCornerType(2);
        ((MaskImageView) this.ʽॱ).ॱ(1);
        return this;
    }

    public void w_() {
        eqx.ˏ(this.ʽॱ, this.ˊᐝ.ॱˌ(), "app_default_icon");
    }

    public void ˏ(CardBean cardBean) {
        super.ˏ(cardBean);
        if (cardBean instanceof GiftCardBean) {
            this.ˏ.setText(((GiftCardBean) cardBean).ˊ());
        } else if (Logger.ˎ()) {
            Logger.ˏ("HorizonGiftCard", "bean is not insstance of GiftCardBean");
        }
    }

    public void x_() {
        if (this.ˊᐝ instanceof GiftCardBean) {
            this.ˉ.setText(this.ॱ.getString(exp$f.ʻˊ, new Object[]{ॱ(((GiftCardBean) this.ˊᐝ).ॱˊ())}));
            return;
        }
        Logger.ˏ("HorizonGiftCard", "bean is not insstance of GiftCardBean");
    }

    public void ॱ(chy o_chy) {
        OnClickListener o_fcs = new fcs(o_chy, this, 0);
        ʼॱ().setOnClickListener(o_fcs);
        ʼॱ().setImportantForAccessibility(2);
        ˉ().setOnClickListener(o_fcs);
    }
}
